Bridging Data and Decision-Making: Data Visualization Techniques with R

IEEE Nigeria Southeast Subsection

Ifeoma Egbogah

Drowning in Data, Starving for Insight

Story: “Too Many Reports, Not Enough Direction”

Let me tell you about Amina.

She worked in customer retention at a mid-sized logistics company. Every Monday, her inbox was flooded with CSV files—customer complaints, delivery delays, package weights, region-wise returns…

All of it collected diligently by the operations team.

But something was wrong.

Despite the data, customer churn kept rising. Leadership was frustrated. Amina felt helpless.

Until one day, she decided to stop sending spreadsheets and start telling stories with the data.

XYZ Logistics Customer Data
Month Region Customer Complaints Average Delivery Delay Days Returns Average Package Weight Kg
Jan-2024 North 119 19 27 5.19
Feb-2024 North 129 23 42 2.76
Mar-2024 North 114 8 59 5.69
Apr-2024 North 112 6 43 6.25
May-2024 North 128 6 40 5.28

XYZ Logistics

XYZ Logistics

Why Data Visualization Matters

No Longer Drowning

  • Humans process visuals 60,000x faster than text

  • Visuals simplify complex data

  • Helps identify trends, outliers, and patterns

  • Supports data-driven decisions

Data

What is Data?

Data refers to raw facts, figures, and statistics that are collected through observation, measurement, research, or experimentation. On their own, data have no meaning until they are organized, analyzed, and interpreted.

Key Characteristics of Data:

  • Raw: Unprocessed and unorganized

  • Factual: Based on real-world events, measurements, or records

Data Types

Numerical or Quantitative Data

Numerical (or Quantitative) data refers to data that represents measurable quantities—that is, values that can be counted or measured and expressed in numbers.

Data Types Contd.

Numerical or Quantitative Data

Continuous Data Discrete Data
Data that can take any value within a range. Data that can take only specific, separate values.
Usually measured (can include decimals/fractions). Usually countable (no decimals)

Examples:

  • Height of a person (e.g., 1.75 meters)

  • Temperature (e.g., 36.6°C)

  • Sales revenue (e.g., ₦1,254,500.75)

Examples:

  • Number of employees in a company (e.g., 15, 23, 50)

  • Number of students in a classroom

  • Number of cars sold in a day

Data Types Contd.

Key Features of Numerical Data:

  • Can be compared, ordered, added, or averaged

  • Suitable for mathematical and statistical analysis

  • Often visualized using bar charts, histograms, line graphs, or scatter plots

Data Types Contd.

Categorical or Qualitative Data

Categorical (or Qualitative) data refers to data that describes qualities or characteristics. Instead of numbers, it uses labels, names, or categories to represent information.

Data Types Contd.

Key Feature of Categorical Data:

  • Descriptive rather than numerical

  • Used to classify or group data

  • Cannot be meaningfully added, subtracted, or averaged

  • Can be visualized using bar charts, pie charts, or tables

Choosing the appropriate graph(s) for the data

So before any visualisation always consider:

  • Discrete & continuous quantities
  • Categeories

Effective Visualization Techniques

Simple Text

When you’re dealing with just one or two figures, using plain text can often be the most effective way to share them.

To illustrate, the figure below appeared in an April 2014 report by the Pew Research Center focusing on stay-at-home mothers.

Simple Text

In this instance, a straightforward sentence does the job: in 2012, 20% of children had a traditional stay-at-home mother, down from 41% in 1970 or present it visually as below.

Tables

  • Engage our verbal system — we read them like text.
  • Ideal for scanning rows and columns to compare specific values.
  • Best for mixed audiences — each person can locate their row or column of interest.
  • Handle multiple units of measure better than graphs (e.g., percentages, currency, counts).
  • Preserve exact figures for precision-focused communication.
Regional Breakdown of Average Delivery Delays
Jan Feb Mar Apr May Jun
North 19 23 8 6 6 16
South-East 20 9 22 22 24 16
South-West 8 22 8 12 20 17
North-Central 11 15 5 11 5 7

Tables That Talk: Making Your Data Shine

  • The table design should be subtle—don’t let it distract.
  • Use light borders or white space to separate rows and columns.
  • Avoid heavy gridlines, bold shading, or intense colours.
  • Keep fonts clean and consistent; emphasize only what matters (e.g., bold totals or key values).
  • The goal: data takes center stage, not the formatting.

Heatmaps

A heatmap transforms a table of numbers into a visual experience by using color to represent the size or intensity of values. Instead of relying solely on digits, it fills each cell with varying shades—making patterns, trends, and outliers instantly easier to spot.

Colouring Your Way to Clarity

  • Reduces cognitive load by turning numbers into visual cues.

  • Color intensity helps the eye quickly identify patterns and outliers.

  • In a heatmap, darker (more saturated) colors indicate higher values.

  • Makes it faster and easier to spot key data points—like the lowest (5) and highest (24) values.

  • Unlike plain tables, visual cues guide attention to areas of interest without extra mental effort.

Graphs

Unlike tables, graphs tap into our visual perception, allowing us to grasp patterns and insights much faster. A thoughtfully crafted graph often communicates key messages more quickly than even the best-designed table.

There are countless types of graphs. They are typically grouped into four main categories:

  • points

  • lines

  • bars

  • area charts.

These core graph styles cover a wide range of everyday data visualization needs.

Points

Scatterplot

A scatterplot is a simple yet powerful chart type used to show the relationship between two numerical variables.

Why Scatterplots Matter in Storytelling:

  • Reveal relationships: Scatterplots help uncover patterns, trends, and correlations that might otherwise remain hidden in raw data.

  • Spot outliers: Unusual points stand out visually, making it easy to identify exceptions or anomalies worth further investigation.

  • Show clusters: When data points form groups, it may hint at sub-categories or behaviors within the data.

  • Support evidence: In data-driven storytelling, scatterplots visually reinforce claims like “as X increases, Y decreases.”

Carbon Majors

To better understand scatterplot we will explore the historical emissions data from Carbon Majors.

Carbon Majors is a database of historical production data from 122 of the world’s largest oil, gas, coal, and cement producers. This data is used to quantify the direct operational emissions and emissions from the combustion of marketed products that can be attributed to these entities. These entities include:

75 Investor-owned Companies, 36 State-owned Companies, 11 Nation States, 82 Oil Producing Entities, 81 Gas Entities, 49 Coal Entities, 6 Cement Entities

The data spans back to 1854 and contains over 1.42 trillion tonnes of CO2 emissions covering 72% of global fossil fuel and cement emissions since the start of the Industrial Revolution in 1751.

Scatterplots

Lines

Line Graph

Olympic Medals

Ireland’s Olympic Medals

PhDs Awards

Line graph can show a single series of data, two series of data, or multiple series. To illustrate we will use data collected by the US gov on all doctoral degree graduates every year. The data comes from the NSF.

Caution: Small differences appear more dramatic

Slopegraph

Slopegraphs can be useful when you have two time periods or points of comparison and want to quickly show relative increases and decreases or differences across various categories between the two data points.

$x
[1] "Number of PhD"

$y
[1] "Field/Faulty"

$title
[1] "PhD Awarded from 2008 to 2017 in the USA"

$caption
[1] "Data: NSF • Viz: Ifeoma Egbogah"

attr(,"class")
[1] "labels"
depart_total <- phd_field |> 
  group_by(broad_field, major_field) |> 
  summarise(phd_total = sum(n_phds, na.rm = TRUE), .groups = "drop") |>
  mutate(major_field = fct_reorder(major_field, phd_total)) |> 
  ggplot(aes(phd_total, major_field)) +
  geom_col() +
  scale_x_continuous(labels = scales::comma_format()) +
  labs(x = "Number of PhD",
       y = "Department",
       title = "Total Number of PhDs Awarded by Departments from 2008 to 2017",
        caption = "Data: NSF • Viz: Ifeoma Egbogah")

Type

Chart Type Best For
Line Chart Trends over time
Bar Chart Comparing categories
Scatter Plot Correlations, relationships
Maps Geospatial data
Dashboard Monitoring KPIs in real-time

Tip: Choose simplicity and clarity over complexity.

Bridging the Gap Between Data and Decisions

Mind the Gap

Problem: Data is abundant, but insights are scarce.

Solution: Visualization bridges the gap between raw data and strategic action.

Outcome: Simplifies storytelling and supports real-time decisions.

What is R and Why Use It?

R

  • Free and open-source statistical language

  • Used in academia and business

  • Integrates data wrangling, analysis, and visualization

Key Visualization Packages:

ggplot2

plotly

shiny

Data Visualization